
import * as fgui from "fairygui-three";

export default class UI_Login extends fgui.GComponent {

    constructor() {
        super()
        this.root = fgui.UIPackage.createObject("a_autogo", "login")
        this.root.makeFullScreen()
        this.addChild(this.root)

        this.onConstruct()
    }

    onConstruct() {
        let root = this.root
        let ani1 = root.getTransitionAt(0)
        let ani2 = root.getTransitionAt(1)
        let panel_auto = root.getChild("panel_auth")
        ani1.play()
        ani1.setHook("ani_end", () => {
            ani2.play()
        })
        ani2.setHook("ani_end", () => {
            // console.log(panel_auto, "-__>>panel_auto")
            panel_auto.visible = true
        })

    }
}